home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SCRIB4.PAK / SCRIBVW.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  2KB  |  71 lines

  1. // ScribVw.h : interface of the CScribbleView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12. /////////////////////////////////////////////////////////////////////////////
  13.  
  14. class CScribbleView : public CScrollView
  15. {
  16. protected: // create from serialization only
  17.     CScribbleView();
  18.     DECLARE_DYNCREATE(CScribbleView)
  19.  
  20. // Attributes
  21. public:
  22.     CScribbleDoc* GetDocument();
  23.  
  24. protected:
  25.     CStroke*    m_pStrokeCur;   // the stroke in progress
  26.     CPoint      m_ptPrev;       // the last mouse pt in the stroke in progress
  27.  
  28. // Operations
  29. public:
  30.  
  31. // Overrides
  32.     // ClassWizard generated virtual function overrides
  33.     //{{AFX_VIRTUAL(CScribbleView)
  34.     public:
  35.     virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  36.     virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  37.     virtual void OnInitialUpdate();
  38.     protected:
  39.     virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  40.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  41.     virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  42.     virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint);
  43.     //}}AFX_VIRTUAL
  44.  
  45. // Implementation
  46. public:
  47.     virtual ~CScribbleView();
  48. #ifdef _DEBUG
  49.     virtual void AssertValid() const;
  50.     virtual void Dump(CDumpContext& dc) const;
  51. #endif
  52.  
  53. protected:
  54.  
  55. // Generated message map functions
  56. protected:
  57.     //{{AFX_MSG(CScribbleView)
  58.     afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  59.     afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  60.     afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  61.     //}}AFX_MSG
  62.     DECLARE_MESSAGE_MAP()
  63. };
  64.  
  65. #ifndef _DEBUG  // debug version in ScribVw.cpp
  66. inline CScribbleDoc* CScribbleView::GetDocument()
  67.    { return (CScribbleDoc*)m_pDocument; }
  68. #endif
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71.